package zlatan_demo13_match

import scala.io.StdIn

//守卫   case语句中添加IF条件判断
object ClassDemo03 {
  def main(args: Array[String]): Unit = {
      println("请输入一个数字: ")
      val a=StdIn.readInt()

      a match {
        case x if x>=0 && x<=3 =>println("[0-3]")
        case x if x>=4 && x<=8 =>println("[4-8]")
        case _=>println("未匹配")

      }
    }


}
